import {lazy} from "react"

const routes = [
    {
        path:"/index",
        component:lazy(()=>import("../views/Index")),
        children:[
            {
                path:"/index/home",
                component:lazy(()=>import("../views/Index/Home"))
            },
            {
                path:"/index/classify",
                component:lazy(()=>import("../views/Index/Classify"))
            },
            {
                path:"/index/supper",
                component:lazy(()=>import("../views/Index/Supper"))
            },
            {
                path:"/index/shopCar",
                component:lazy(()=>import("../views/Index/ShopCar"))
            },
            {
                path:"/index/my",
                component:lazy(()=>import("../views/Index/My"))
            },
            {
                path:"/index",
                redirect:"/index/home"
            }
        ]
    },
    {
        path:"/login",
        component:lazy(()=>import("../views/Login"))
    },
    {
        path:"/detail/:id",
        component:lazy(()=>import("../views/Detail"))
    },
    {
        path:"/",
        redirect:"/index"
    }
]



export default routes